import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class a1{
    /*
    10 16 17
    */
    public static int mp[][]={
        {0,4,3,3,3,3,2,3,1,2},
        {4,0,5,3,2,5,6,2,5,4},
        {3,5,0,2,5,4,3,4,2,1},
        {3,3,2,0,3,2,3,2,2,1},
        {3,2,5,3,0,3,4,3,3,2},
        {3,5,4,2,3,0,1,4,2,1},
        {2,6,3,3,4,1,0,5,1,2},
        {3,2,4,2,3,4,5,0,4,3},
        {1,5,2,2,3,2,1,4,0,1},
        {2,4,1,1,2,1,2,3,1,0}
    };
    public static int mm[]={6,2,5,5,4,5,6,3,7,6};
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String s =br.readLine();
            int len=s.length();
            //窗口长度
            int c[]=new int[len+1];
            //Arrays.fill(c,-1);
            for(int i=1;i<=len;i++){
                Arrays.fill(c,-1);
                int cnt=0,l=0,r=0;
                while(r-l<i){
                    if(r-l<i && c[r]==-1){
                        c[r]=s.charAt(r)-'0';
                        cnt+=mm[c[r]];
                    }else if(r-l<i){
                        int t=s.charAt(r)-'0';
                        cnt+=mp[c[r]][t];
                        c[r]=t;
                    }
                    r++;
                }
                //System.out.println(cnt);
                //System.out.println(l+" "+r);
                while(r<=len){
                    //System.out.println(l+" "+r);
                    for(int k=l;k<r;k++){
                        int t=s.charAt(k)-'0';
                        cnt+=mp[c[k-l]][t];
                        c[k-l]=t;
                    }
                    l++;r++;
                }
                System.out.print(cnt+" ");
            }
        } catch (Exception e) {
            //TODO: handle exception
            e.printStackTrace();
            //System.out.println("error");
        }
        
    }




}